package com.example.wanxiang.repository;

import com.example.wanxiang.entity.Comment;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CommentRepository extends MongoRepository<Comment,String>{

    List<Comment> findByArticleId(String articleId, Pageable pageable);

    List<Comment> findByUserId(Long userId);
}
